import React, {Component} from 'react';
import {
  View,
  Text,
  TouchableOpacity,
  StyleSheet,
  Platform,
  Picker,
} from 'react-native';

import Config from '../../config';
import Colors from '../../common/Colors';
import CommonStyles from '../../common/CommonStyles';
import SizeUtils from '../../common/SizeUtils';
import TImage from '../../components/TImage';
import WH_Constants from './WH_Constants';
import CommonListPage from '../common/CommonListPage';
import {DateUtils} from '../../utils/Utils';
import WH_RequestPostsAction from '../../actions/workhard/WH_RequestPostsAction';
import WH_PostItemView from './WH_PostJDZItemView';

export default class WH_ZhuanjiaListPage extends CommonListPage {
	constructor(props) {
      super(props);
	}
	_getViewStyle() {
      return {paddingTop:Config.paddingTop,
        backgroundColor:"#ffffff"}
  	}
	_getListViewStyle() {
      return {
        width:SizeUtils.getWindowSize().width,
        paddingTop:0,
        height:(SizeUtils.getWindowSize().height - Config.paddingTop - SizeUtils.translateDesignHeightToCode(210)),
        backgroundColor:"#ff0"};
  	}
  refRefresh(){
    this.doRefresh();
  }
    _onRenderItem(data, index) {
      return (<WH_PostItemView refRefresh={this.refRefresh.bind(this)} data={data} index={index} showNum = {true} />)
    }
  	_requestData(page, listView) {
      new WH_RequestPostsAction().call(listView, {sort_id:1,
      recommend:1,
      page:page, page_size:10});
  	}
}